package com.erp.service.impl;

import com.erp.entity.UserRole;
import com.erp.mapper.UserRoleMapper;
import com.erp.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author pyj
 * @since 2020-11-07
 */
@Service
public class UserRoleServiceImpl implements UserRoleService {

    @Autowired
    private UserRoleMapper userRoleMapper;


    @Override
    public UserRole findUserRoleByName(String name) {
        return userRoleMapper.findUserRoleByName(name);
    }

    @Override
    public List<UserRole> getAll() {
        return userRoleMapper.getAll();
    }

    @Override
    public int add(UserRole userRole) {
        return userRoleMapper.add(userRole);
    }

    @Override
    public int delete(Integer id) {
        return userRoleMapper.delete(id);
    }

    @Override
    public int update(UserRole userRole) {
        return userRoleMapper.update(userRole);
    }
}
